Integrand size = 14, antiderivative size = 52 \[ \int \frac {\cos (a+b x)}{c+d x} \, dx=\frac {\cos \left (a-\frac {b c}{d}\right ) \operatorname {CosIntegral}\left (\frac {b c}{d}+b x\right )}{d}-\frac {\sin \left (a-\frac {b c}{d}\right ) \text {Si}\left (\frac {b c}{d}+b x\right )}{d} \]
Time = 0.11 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.96 \[ \int \frac {\cos (a+b x)}{c+d x} \, dx=\frac {\cos \left (a-\frac {b c}{d}\right ) \operatorname {CosIntegral}\left (\frac {b c}{d}+b x\right )-\sin \left (a-\frac {b c}{d}\right ) \text {Si}\left (\frac {b c}{d}+b x\right )}{d} \]
(Cos[a - (b*c)/d]*CosIntegral[(b*c)/d + b*x] - Sin[a - (b*c)/d]*SinIntegra l[(b*c)/d + b*x])/d
Time = 0.39 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.357, Rules used = {3042, 3784, 3042, 3780, 3783}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cos (a+b x)}{c+d x} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin \left (a+b x+\frac {\pi }{2}\right )}{c+d x}dx\) |
\(\Big \downarrow \) 3784 |
\(\displaystyle \cos \left (a-\frac {b c}{d}\right ) \int \frac {\cos \left (\frac {b c}{d}+b x\right )}{c+d x}dx-\sin \left (a-\frac {b c}{d}\right ) \int \frac {\sin \left (\frac {b c}{d}+b x\right )}{c+d x}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \cos \left (a-\frac {b c}{d}\right ) \int \frac {\sin \left (\frac {b c}{d}+b x+\frac {\pi }{2}\right )}{c+d x}dx-\sin \left (a-\frac {b c}{d}\right ) \int \frac {\sin \left (\frac {b c}{d}+b x\right )}{c+d x}dx\) |
\(\Big \downarrow \) 3780 |
\(\displaystyle \cos \left (a-\frac {b c}{d}\right ) \int \frac {\sin \left (\frac {b c}{d}+b x+\frac {\pi }{2}\right )}{c+d x}dx-\frac {\sin \left (a-\frac {b c}{d}\right ) \text {Si}\left (\frac {b c}{d}+b x\right )}{d}\) |
\(\Big \downarrow \) 3783 |
\(\displaystyle \frac {\cos \left (a-\frac {b c}{d}\right ) \operatorname {CosIntegral}\left (\frac {b c}{d}+b x\right )}{d}-\frac {\sin \left (a-\frac {b c}{d}\right ) \text {Si}\left (\frac {b c}{d}+b x\right )}{d}\) |
(Cos[a - (b*c)/d]*CosIntegral[(b*c)/d + b*x])/d - (Sin[a - (b*c)/d]*SinInt egral[(b*c)/d + b*x])/d
3.1.5.3.1 Defintions of rubi rules used
Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinInte gral[e + f*x]/d, x] /; FreeQ[{c, d, e, f}, x] && EqQ[d*e - c*f, 0]
Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosInte gral[e - Pi/2 + f*x]/d, x] /; FreeQ[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]
Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[Cos[(d* e - c*f)/d] Int[Sin[c*(f/d) + f*x]/(c + d*x), x], x] + Simp[Sin[(d*e - c* f)/d] Int[Cos[c*(f/d) + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f}, x] && NeQ[d*e - c*f, 0]
Time = 0.74 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.48
method | result | size |
derivativedivides | \(-\frac {\operatorname {Si}\left (-b x -a -\frac {-a d +b c}{d}\right ) \sin \left (\frac {-a d +b c}{d}\right )}{d}+\frac {\operatorname {Ci}\left (b x +a +\frac {-a d +b c}{d}\right ) \cos \left (\frac {-a d +b c}{d}\right )}{d}\) | \(77\) |
default | \(-\frac {\operatorname {Si}\left (-b x -a -\frac {-a d +b c}{d}\right ) \sin \left (\frac {-a d +b c}{d}\right )}{d}+\frac {\operatorname {Ci}\left (b x +a +\frac {-a d +b c}{d}\right ) \cos \left (\frac {-a d +b c}{d}\right )}{d}\) | \(77\) |
risch | \(-\frac {{\mathrm e}^{-\frac {i \left (a d -b c \right )}{d}} \operatorname {Ei}_{1}\left (i x b +i a -\frac {i \left (a d -b c \right )}{d}\right )}{2 d}-\frac {{\mathrm e}^{\frac {i \left (a d -b c \right )}{d}} \operatorname {Ei}_{1}\left (-i x b -i a -\frac {-i a d +i b c}{d}\right )}{2 d}\) | \(96\) |
Time = 0.27 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.19 \[ \int \frac {\cos (a+b x)}{c+d x} \, dx=\frac {\cos \left (-\frac {b c - a d}{d}\right ) \operatorname {Ci}\left (\frac {b d x + b c}{d}\right ) - \sin \left (-\frac {b c - a d}{d}\right ) \operatorname {Si}\left (\frac {b d x + b c}{d}\right )}{d} \]
(cos(-(b*c - a*d)/d)*cos_integral((b*d*x + b*c)/d) - sin(-(b*c - a*d)/d)*s in_integral((b*d*x + b*c)/d))/d
\[ \int \frac {\cos (a+b x)}{c+d x} \, dx=\int \frac {\cos {\left (a + b x \right )}}{c + d x}\, dx \]
Result contains complex when optimal does not.
Time = 0.31 (sec) , antiderivative size = 142, normalized size of antiderivative = 2.73 \[ \int \frac {\cos (a+b x)}{c+d x} \, dx=-\frac {b {\left (E_{1}\left (\frac {i \, b c + i \, {\left (b x + a\right )} d - i \, a d}{d}\right ) + E_{1}\left (-\frac {i \, b c + i \, {\left (b x + a\right )} d - i \, a d}{d}\right )\right )} \cos \left (-\frac {b c - a d}{d}\right ) - b {\left (i \, E_{1}\left (\frac {i \, b c + i \, {\left (b x + a\right )} d - i \, a d}{d}\right ) - i \, E_{1}\left (-\frac {i \, b c + i \, {\left (b x + a\right )} d - i \, a d}{d}\right )\right )} \sin \left (-\frac {b c - a d}{d}\right )}{2 \, b d} \]
-1/2*(b*(exp_integral_e(1, (I*b*c + I*(b*x + a)*d - I*a*d)/d) + exp_integr al_e(1, -(I*b*c + I*(b*x + a)*d - I*a*d)/d))*cos(-(b*c - a*d)/d) - b*(I*ex p_integral_e(1, (I*b*c + I*(b*x + a)*d - I*a*d)/d) - I*exp_integral_e(1, - (I*b*c + I*(b*x + a)*d - I*a*d)/d))*sin(-(b*c - a*d)/d))/(b*d)
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.34 (sec) , antiderivative size = 577, normalized size of antiderivative = 11.10 \[ \int \frac {\cos (a+b x)}{c+d x} \, dx=\frac {\Re \left ( \operatorname {Ci}\left (b x + \frac {b c}{d}\right ) \right ) \tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {b c}{2 \, d}\right )^{2} + \Re \left ( \operatorname {Ci}\left (-b x - \frac {b c}{d}\right ) \right ) \tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {b c}{2 \, d}\right )^{2} - 2 \, \Im \left ( \operatorname {Ci}\left (b x + \frac {b c}{d}\right ) \right ) \tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {b c}{2 \, d}\right ) + 2 \, \Im \left ( \operatorname {Ci}\left (-b x - \frac {b c}{d}\right ) \right ) \tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {b c}{2 \, d}\right ) - 4 \, \operatorname {Si}\left (\frac {b d x + b c}{d}\right ) \tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {b c}{2 \, d}\right ) + 2 \, \Im \left ( \operatorname {Ci}\left (b x + \frac {b c}{d}\right ) \right ) \tan \left (\frac {1}{2} \, a\right ) \tan \left (\frac {b c}{2 \, d}\right )^{2} - 2 \, \Im \left ( \operatorname {Ci}\left (-b x - \frac {b c}{d}\right ) \right ) \tan \left (\frac {1}{2} \, a\right ) \tan \left (\frac {b c}{2 \, d}\right )^{2} + 4 \, \operatorname {Si}\left (\frac {b d x + b c}{d}\right ) \tan \left (\frac {1}{2} \, a\right ) \tan \left (\frac {b c}{2 \, d}\right )^{2} - \Re \left ( \operatorname {Ci}\left (b x + \frac {b c}{d}\right ) \right ) \tan \left (\frac {1}{2} \, a\right )^{2} - \Re \left ( \operatorname {Ci}\left (-b x - \frac {b c}{d}\right ) \right ) \tan \left (\frac {1}{2} \, a\right )^{2} + 4 \, \Re \left ( \operatorname {Ci}\left (b x + \frac {b c}{d}\right ) \right ) \tan \left (\frac {1}{2} \, a\right ) \tan \left (\frac {b c}{2 \, d}\right ) + 4 \, \Re \left ( \operatorname {Ci}\left (-b x - \frac {b c}{d}\right ) \right ) \tan \left (\frac {1}{2} \, a\right ) \tan \left (\frac {b c}{2 \, d}\right ) - \Re \left ( \operatorname {Ci}\left (b x + \frac {b c}{d}\right ) \right ) \tan \left (\frac {b c}{2 \, d}\right )^{2} - \Re \left ( \operatorname {Ci}\left (-b x - \frac {b c}{d}\right ) \right ) \tan \left (\frac {b c}{2 \, d}\right )^{2} - 2 \, \Im \left ( \operatorname {Ci}\left (b x + \frac {b c}{d}\right ) \right ) \tan \left (\frac {1}{2} \, a\right ) + 2 \, \Im \left ( \operatorname {Ci}\left (-b x - \frac {b c}{d}\right ) \right ) \tan \left (\frac {1}{2} \, a\right ) - 4 \, \operatorname {Si}\left (\frac {b d x + b c}{d}\right ) \tan \left (\frac {1}{2} \, a\right ) + 2 \, \Im \left ( \operatorname {Ci}\left (b x + \frac {b c}{d}\right ) \right ) \tan \left (\frac {b c}{2 \, d}\right ) - 2 \, \Im \left ( \operatorname {Ci}\left (-b x - \frac {b c}{d}\right ) \right ) \tan \left (\frac {b c}{2 \, d}\right ) + 4 \, \operatorname {Si}\left (\frac {b d x + b c}{d}\right ) \tan \left (\frac {b c}{2 \, d}\right ) + \Re \left ( \operatorname {Ci}\left (b x + \frac {b c}{d}\right ) \right ) + \Re \left ( \operatorname {Ci}\left (-b x - \frac {b c}{d}\right ) \right )}{2 \, {\left (d \tan \left (\frac {1}{2} \, a\right )^{2} \tan \left (\frac {b c}{2 \, d}\right )^{2} + d \tan \left (\frac {1}{2} \, a\right )^{2} + d \tan \left (\frac {b c}{2 \, d}\right )^{2} + d\right )}} \]
1/2*(real_part(cos_integral(b*x + b*c/d))*tan(1/2*a)^2*tan(1/2*b*c/d)^2 + real_part(cos_integral(-b*x - b*c/d))*tan(1/2*a)^2*tan(1/2*b*c/d)^2 - 2*im ag_part(cos_integral(b*x + b*c/d))*tan(1/2*a)^2*tan(1/2*b*c/d) + 2*imag_pa rt(cos_integral(-b*x - b*c/d))*tan(1/2*a)^2*tan(1/2*b*c/d) - 4*sin_integra l((b*d*x + b*c)/d)*tan(1/2*a)^2*tan(1/2*b*c/d) + 2*imag_part(cos_integral( b*x + b*c/d))*tan(1/2*a)*tan(1/2*b*c/d)^2 - 2*imag_part(cos_integral(-b*x - b*c/d))*tan(1/2*a)*tan(1/2*b*c/d)^2 + 4*sin_integral((b*d*x + b*c)/d)*ta n(1/2*a)*tan(1/2*b*c/d)^2 - real_part(cos_integral(b*x + b*c/d))*tan(1/2*a )^2 - real_part(cos_integral(-b*x - b*c/d))*tan(1/2*a)^2 + 4*real_part(cos _integral(b*x + b*c/d))*tan(1/2*a)*tan(1/2*b*c/d) + 4*real_part(cos_integr al(-b*x - b*c/d))*tan(1/2*a)*tan(1/2*b*c/d) - real_part(cos_integral(b*x + b*c/d))*tan(1/2*b*c/d)^2 - real_part(cos_integral(-b*x - b*c/d))*tan(1/2* b*c/d)^2 - 2*imag_part(cos_integral(b*x + b*c/d))*tan(1/2*a) + 2*imag_part (cos_integral(-b*x - b*c/d))*tan(1/2*a) - 4*sin_integral((b*d*x + b*c)/d)* tan(1/2*a) + 2*imag_part(cos_integral(b*x + b*c/d))*tan(1/2*b*c/d) - 2*ima g_part(cos_integral(-b*x - b*c/d))*tan(1/2*b*c/d) + 4*sin_integral((b*d*x + b*c)/d)*tan(1/2*b*c/d) + real_part(cos_integral(b*x + b*c/d)) + real_par t(cos_integral(-b*x - b*c/d)))/(d*tan(1/2*a)^2*tan(1/2*b*c/d)^2 + d*tan(1/ 2*a)^2 + d*tan(1/2*b*c/d)^2 + d)
Timed out. \[ \int \frac {\cos (a+b x)}{c+d x} \, dx=\int \frac {\cos \left (a+b\,x\right )}{c+d\,x} \,d x \]